package jsyf.oa.entity.pm;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by 92852 on 2018/4/17.
 */
@Entity
@Table(name = "T_PM_PROJECT", schema = "oa", catalog = "")
public class ProjectEntity extends BaseEntity{
    private String id;
    private String parentId;
    private String proName;
    private String proPrincipal;
    private String proLevel;
    private String createUserId;
    private Integer sortNo;
    private String proSn;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getProPrincipal() {
        return proPrincipal;
    }

    public void setProPrincipal(String proPrincipal) {
        this.proPrincipal = proPrincipal;
    }

    public String getProLevel() {
        return proLevel;
    }

    public void setProLevel(String proLevel) {
        this.proLevel = proLevel;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public String getProSn() {
        return proSn;
    }

    public void setProSn(String proSn) {
        this.proSn = proSn;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("PARENT_ID", this.getParentId());
        obj.put("PRO_NAME", this.getProName());
        obj.put("PRO_PRINCIPAL", this.getProPrincipal());
        obj.put("PRO_LEVEL", this.getProLevel());
        obj.put("CREATE_USER_ID", this.getCreateUserId());
        obj.put("SORT_NO", this.getSortNo());
        obj.put("PRO_SN", this.getProSn());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_PM_PROJECT";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("PARENT_ID", "parentId");
        obj.put("PRO_NAME", "proName");
        obj.put("PRO_PRINCIPAL", "proPrincipal");
        obj.put("PRO_LEVEL", "proLevel");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("SORT_NO", "sortNo");
        obj.put("PRO_SN", "proSn");

        return obj;
    }
}
